package com.hncu.stringbuilder;

public class Demo3 {
    public static void main(String[] args) {
        String s = "123abc";
        //将字符串转为StringBuilder
        StringBuilder sb = new StringBuilder(s);
        sb.append(123);
        System.out.println(sb);
        System.out.println("----------------");
        //将StringBuilder转换成String
        String s1  = sb.toString();
        System.out.println(s1);
    }
}
